package com.ruoyi.common.enums;

public enum PushNotificationEnum {
    transaction_success(
        "transaction_success",
        "交易成功通知",
        "Transaction Successful Notification",
        "取引成功通知",
        "您已成功支付 {0}{1} 给商户：{2}。",
        "You have successfully paid {0}{1} to merchant: {2}.",
        "{0}{1} を加盟店 {2} に支払いました。"
    ),
    withdrawal_or_transfer_request(
        "withdrawal_or_transfer_request",
            "提现/转账申请通知",
            "Withdrawal/Transfer Request Notification",
            "引き出し/送金申請通知",
            "您的提现请求 {0}{1} 已提交，系统正在处理中。",
            "Your withdrawal request of {0}{1} has been submitted and is being processed.",
            "{0}{1} の引き出しリクエストが送信され、処理中です。"
    ),
    transaction_failed(
        "transaction_failed",
        "交易失败或异常通知",
        "Failed or Abnormal Transaction Notification",
        "取引失敗または異常通知",
        "由于网络拥堵，您的转账暂未完成，请稍后重试。",
        "Due to network congestion, your transfer has not been completed. Please try again later.",
        "ネットワークの混雑により送金が完了していません。後ほど再度お試しください。"
    ),
    incoming_transaction(
        "incoming_transaction",
        "到账通知",
        "Incoming Transaction Notification",
        "入金通知",
        "您收到一笔入账：+{0}{1}",
        "You have received +{0}{1}",
        "+{0}{1} を受け取りました。"
    ),
    kyc_audit(
        "kyc_audit",
        "KYC 审核结果通知",
        "KYC Verification Result Notification",
        "KYC 認証結果通知",
        "您的身份验证已通过，欢迎使用全部功能。",
        "Your identity verification has been approved. All features are now available.",
        "本人確認が承認されました。全ての機能をご利用いただけます。"
    ),
    secure_login(
        "secure_login",
        "安全登录通知",
        "Secure Login Notification",
        "ログインセキュリティ通知",
        "检测到来自新设备的登录：{0} – {1}。",
        "Login detected from a new device: {0} – {1}.",
        "新しいデバイスからのログインを検出しました：{0} – {1}。"
    ),
    pwd_or_security_setting_change(
        "pwd_or_security_setting_change",
        "密码/安全设置变更通知",
        "Password/Security Setting Change Notification",
        "パスワード/セキュリティ設定変更通知",
        "您的登录密码已修改，如非本人操作请立即联系客服。",
        "Your login password has been changed. Contact support if this wasn’t you.",
        "ログインパスワードが変更されました。身に覚えがない場合はサポートまでご連絡ください。"
    ),
    account_balance_change(
        "account_balance_change",
        "账户余额变动提醒",
        "Account Balance Change Notification",
        "残高変動通知",
        "提醒：账户余额减少 {0}{1}，请确认交易明细。",
        "Notice: Your account balance decreased by {0}{1}. Please verify the details.",
        "残高が {0}{1} 減少しました。取引内容をご確認ください。"
    ),
    card_payment_service(
        "card_payment_service",
        "卡片与支付服务通知",
        "Card and Payment Service Notification",
        "カードおよび支払いサービス通知",
        "您的 UBPay 虚拟卡已启用，可立即绑定 Apple Pay / Google Pay。",
        "Your UBPay virtual card is now active. You can link it to Apple Pay/Google Pay.",
        "UBPay バーチャルカードが有効化されました。Apple Pay / Google Pay に追加できます。"
    ),
    withdrawal_success(
        "withdrawal_success",
        "提现交易成功通知",
        "Notice of successful withdrawal transaction",
        "引き出し取引成功通知",
        "您已成功提取 {0}{1}。若您未进行此操作，请立即联系我们的客服。",
        "You have successfully withdrawn {0}{1}. If you do not recognise this activity, please contact our customer service immediately.",
        "{0}{1}の引き出しが正常に完了しました。この操作にお心当たりがない場合は、直ちにカスタマーサポートまでご連絡ください。"
    )
    ;

    private final String pushType;
    private final String zhTitle;
    private final String enTitle;
    private final String jaTitle;
    private final String zhContent;
    private final String enContent;
    private final String jaContent;

    PushNotificationEnum(String pushType, String zhTitle, String enTitle, String jaTitle,
                         String zhContent, String enContent, String jaContent) {
        this.pushType = pushType;
        this.zhTitle = zhTitle;
        this.enTitle = enTitle;
        this.jaTitle = jaTitle;
        this.zhContent = zhContent;
        this.enContent = enContent;
        this.jaContent = jaContent;
    }

    public String getPushType() {
        return pushType;
    }

    public String getZhTitle() {
        return zhTitle;
    }

    public String getEnTitle() {
        return enTitle;
    }

    public String getJaTitle() {
        return jaTitle;
    }

    public String getZhContent() {
        return zhContent;
    }

    public String getEnContent() {
        return enContent;
    }

    public String getJaContent() {
        return jaContent;
    }

    /**
     * 根据pushType获取对应的枚举实例
     */
    public static PushNotificationEnum fromPushType(String pushType) {
        for (PushNotificationEnum notification : values()) {
            if (notification.pushType.equals(pushType)) {
                return notification;
            }
        }
        throw new IllegalArgumentException("No constant with pushType " + pushType + " found");
    }
}
